/**
 * 
 */
package simpleFactory;

/**
 * @author sz
 *
 * create time：2012-7-31
 */
public class OperationFactory {

	public static Operation createOperation(String operation){
		
		Operation oper = null;
		
		if(operation.equals("+")){
			oper = new OperationAdd();
		}else if(operation.equals("-")){
			oper = new OperationSub();
		}else if(operation.equals("*")){
			oper = new OperationMul();
		}else if(operation.equals("/")){
			oper = new OperationDiv();
		}
		
		return oper;
	}
}
